package com.cskaoyan.mapper;

import com.cskaoyan.bean.StatUser;
import com.cskaoyan.bean.User;
import com.cskaoyan.bean.UserExample;

import java.util.List;

import com.cskaoyan.bean.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

/**
 * @author
 * @date 2020/12/5 15:59
 */
@Mapper
@Component
public interface UserMapper {
    long countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    List<StatUser> statUsersGroupByAddtime();

    List<String> selectPermissionByUserId(@Param("userId") Integer userId);

    UserInfo selectUserInfo(@Param("userId") Integer userId);
}